# 变量h   变量k
n = 5
for h in range(1, n):
    if h == 1 or h == n-1:
        print("*" * n)
    else:
        k = n - 2
        print("*" + " " * k + "*")
print("")
